/**
* Author: CZ (cz.devnet@gmail.com)
*
* Description:
 */

package main

import (
	"fmt"
	"github.com/PuerkitoBio/goquery"
	"net/http"
	"strings"
)

func init() {

}

func NewFilter() *Filter {
	filter := &Filter{}
	filter.init()
	return filter
}

type Filter struct {
}

func (f *Filter) init() {

}

func (f *Filter) Filter(rsp *http.Response) (rst []string) {
	doc, err := goquery.NewDocumentFromResponse(rsp)
	if nil != err {
		fmt.Printf("NewDocuemtn Error:%s\n", err.Error())
		return nil
	}
	slc := doc.Find(".c71392")
	slc.Each(func(i int, s *goquery.Selection) {
		rst = append(rst, strings.TrimSpace(s.Text()))
	})
	return rst

}
